package com.alex.zookeeper.crud;

import com.alex.zookeeper.BaseTest;
import org.apache.zookeeper.AsyncCallback;
import org.junit.Test;

/**
 * 删除节点
 */
public class ZKDelete extends BaseTest {

    @Test
    public void sync() throws Exception {
        zooKeeper.delete(PATH, -1);
    }

    @Test
    public void async() throws Exception {
        zooKeeper.delete(PATH, -1, new AsyncCallback.VoidCallback() {
            @Override
            public void processResult(int i, String s, Object o) {

            }
        }, "async delete");
    }
}
